package com.itheima.spring.factory;

import com.itheima.spring.Dao.BookDao;
import com.itheima.spring.Dao.impl.BookDaoImpl;
import org.springframework.beans.factory.FactoryBean;

public class BookDaoFactoryBean implements FactoryBean<BookDao> {
    public BookDao getObject() throws Exception {
        return new BookDaoImpl();
    }
    public Class<?> getObjectType() {
        return BookDao.class;
    }

    public void init()
        {
            System.out.println("初始化方法");
        }
        public void destroy()
        {
            System.out.println("销毁方法");
        }
}
